UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DWHzLwswl1aRPZdZ5M2iCwdz9JmTRxj7iKkWjsqlzKg='
WHERE
key_id = 'd675aa39266d79b2915186536db2459a425c0b2f59223f510f5b890574606bc4'
AND (
token = 'DWHzLwswl1aRPZdZ5M2iCwdz9JmTRxj7iKkWjsqlzKg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)