UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4iM5EQxocZsm3I8D2vnVZbO3wVGpUHHApmaJZL93z/4='
WHERE
key_id = '27e5dd70ff6e1cb43729c470c5d9f420a9d96dc8ac855e70dd1a5fc263a55d45'
AND (
token = '4iM5EQxocZsm3I8D2vnVZbO3wVGpUHHApmaJZL93z/4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)