UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1fp303xxvNxM2DeOYoW6ligZh4qVIthuu9SKHVmqD/o='
WHERE
key_id = '92b4905a1c714097000d2e011e37506e9cbd52d37f291e7825d867955a085e1a'
AND (
token = '1fp303xxvNxM2DeOYoW6ligZh4qVIthuu9SKHVmqD/o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)