UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GgF+ykPraMyzQd9m2t/ULoW6sQZNA+G5nObOhy+6lvg='
WHERE
key_id = '9d20f95b19cece2b5e9ed25047eb53e213b98d890b825c0ed792247e610e6695'
AND (
token = 'GgF+ykPraMyzQd9m2t/ULoW6sQZNA+G5nObOhy+6lvg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)