UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1RNxVSbjx8Kuc8FjATFyS1fqafU9/GJoDK83TPpRZjg='
WHERE
key_id = '26f6f6beea8aee01d06caef950433553e4097e607851a087302a862782138e81'
AND (
token = '1RNxVSbjx8Kuc8FjATFyS1fqafU9/GJoDK83TPpRZjg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)