UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GxvJbX3XPwfSOi0Zzqxau/cX5nhbxMHMo2a2Ve9NnVo='
WHERE
key_id = '7518dbfeed53bd464b4c58fddce53d18eb70aab1cda5184d5d0ce427a419e770'
AND (
token = 'GxvJbX3XPwfSOi0Zzqxau/cX5nhbxMHMo2a2Ve9NnVo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)