UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'o3F4NFxM6mcfTzlbgZFG5GI+2nsIMXPkghiT7rp84hc='
WHERE
key_id = '69280ab5326744d9d640ab23d8bdc4e5ff681a35f34b5a84b069972f0e9e7ada'
AND (
token = 'o3F4NFxM6mcfTzlbgZFG5GI+2nsIMXPkghiT7rp84hc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)