UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '41PIhbupOHApNs+1T2gkWHWFgP/PbYZq4g2QiywVT/s='
WHERE
key_id = '49b63c96cb278b199bbdc83c4659c53c6602861b857a09e9acd7cbca7f95cb91'
AND (
token = '41PIhbupOHApNs+1T2gkWHWFgP/PbYZq4g2QiywVT/s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)