UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DgozBT/p7WVNoFADBGO/FCP5eeUHrVlAv/zsV0j8VR4='
WHERE
key_id = '33383a4e0602605e110458b7dbc13d1eb3d58d539917dfff4451f99b698aeb71'
AND (
token = 'DgozBT/p7WVNoFADBGO/FCP5eeUHrVlAv/zsV0j8VR4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)