UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '//IovXH0xialUbeGbL5qBo2UprPJTt4nCgr6ptA5CVM='
WHERE
key_id = '680be18c5cc9eb3fefe3c1fa4f47cee9ffa35ef6c75622109ea6d9b2669ef3e0'
AND (
token = '//IovXH0xialUbeGbL5qBo2UprPJTt4nCgr6ptA5CVM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)