UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Vc/ha6At+dL1934NR5epokYir+G3/yQv2/PaL1Prm+E='
WHERE
key_id = 'ce8cbaaa76db09c34743eb3a861288998496810e50936dcc7ffd27f1533b7eea'
AND (
token = 'Vc/ha6At+dL1934NR5epokYir+G3/yQv2/PaL1Prm+E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)