UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/tZkIpxoLke9pTOINjvbqRXCOMMoT8BDa2jbu/Fscl0='
WHERE
key_id = '727028da11099b756152eb97cbe2c4d885a94637ac56fe6523cc8263564969f9'
AND (
token = '/tZkIpxoLke9pTOINjvbqRXCOMMoT8BDa2jbu/Fscl0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)