UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RGVbPU9UaZjC3FOx2+BRc3H6PmbcjtG9hJT1eitRTlU='
WHERE
key_id = '48cfd47a07e8ca0032191574cbb031b98b4af062b9bc03894258eabb60b71eb0'
AND (
token = 'RGVbPU9UaZjC3FOx2+BRc3H6PmbcjtG9hJT1eitRTlU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)