UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eOFE5w8I2aJhy5f1EMrrnYqznui6Z1cDfmKXgETWIpg='
WHERE
key_id = '4286f80bbb238d2f024fe24f687ce3ad0af7072700cf9cc1913f0a4505fbcaf8'
AND (
token = 'eOFE5w8I2aJhy5f1EMrrnYqznui6Z1cDfmKXgETWIpg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)