UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OOg6N44EKp1qyos50n3PCdex36jU+IXEHi0pO1cS4Hk='
WHERE
key_id = '75297ee14e4388a7a69a320ee0b31bf469f0d27dbd8cae0872b5f784f6e4fe9e'
AND (
token = 'OOg6N44EKp1qyos50n3PCdex36jU+IXEHi0pO1cS4Hk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)