UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Odwt1QKQRGMf+j0PJnq3aH9ZKYpYXR38mVJbVZTaoBE='
WHERE
key_id = 'da7c8393b51a2b306bff03d1eebc6758aee684b12cdd286eb1c8a48d3a79c779'
AND (
token = 'Odwt1QKQRGMf+j0PJnq3aH9ZKYpYXR38mVJbVZTaoBE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)