UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pZH8HeUa1UblEMVDSqd1/WPG7lSkXPqVsh474dnyvaQ='
WHERE
key_id = '54fa5d70449d3398950be415ed2babcf62a5ffcaf3130044901a770268555a27'
AND (
token = 'pZH8HeUa1UblEMVDSqd1/WPG7lSkXPqVsh474dnyvaQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)