UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ec2SzplYZJg3qBZ1GeNZBgohdIxQ78HRXyqYlXJP8kY='
WHERE
key_id = '60cfa09b92b924adcdeb43f11f16d3881ad6483281f9e40b04533116b17bc2e6'
AND (
token = 'ec2SzplYZJg3qBZ1GeNZBgohdIxQ78HRXyqYlXJP8kY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)