UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4YlbY14kUZyhJBQJZz+tXbi/TNuvYzHTTFtK4SdL7rY='
WHERE
key_id = '67f506b1cd1fabf1effc9a2ee3a316d96677f2912f93ecd4ad6e65379ad987a4'
AND (
token = '4YlbY14kUZyhJBQJZz+tXbi/TNuvYzHTTFtK4SdL7rY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)