UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zzoKvJqKYYl2G1PvtqDTBUUVd60sbhh/ariVNcSo8Wg='
WHERE
key_id = 'ddbb7ff2269d6d82af890acd1042b9cae36bfa123c0d5b614caf68db0bcc6899'
AND (
token = 'zzoKvJqKYYl2G1PvtqDTBUUVd60sbhh/ariVNcSo8Wg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)