UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'syrZkT318mnzZwqzHfYUeu+T/c+p5xKGkkrVdwb4ae0='
WHERE
key_id = '2c0d01294cbb308d73af8053765913ac82482640833d6b762d70370a20520238'
AND (
token = 'syrZkT318mnzZwqzHfYUeu+T/c+p5xKGkkrVdwb4ae0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)