UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'eyb2R7Wvp/rgJ8FuVBZ0QM4Ppo7oZSUl4ecz4M/E5cE=' 
WHERE 
  key_id = 'b1eacf74d2de0aeab8465183a2c700c157fb4d2022c1a24ecbc8598fe5d4ea8a' 
  AND (
    token = 'eyb2R7Wvp/rgJ8FuVBZ0QM4Ppo7oZSUl4ecz4M/E5cE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035