UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/dia89oDf3yTdH8r9kgr2w5knRBzKzeUW8O+Y2bz1aU='
WHERE
key_id = '73a353233be7938cd1700b8058cdc4da42f35f70359cd5e0272099475d5d75c5'
AND (
token = '/dia89oDf3yTdH8r9kgr2w5knRBzKzeUW8O+Y2bz1aU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)