UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8sP5UckJOIDUzgAxVC4xfWVOV868pHRLQWDo5f7ceIM='
WHERE
key_id = '93885b92e9306af3cc0c0c10624faff1559b1d32cd88d63e05906a97f197c415'
AND (
token = '8sP5UckJOIDUzgAxVC4xfWVOV868pHRLQWDo5f7ceIM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)