UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'WAkfnkaS/Pljc0iyNKPvFvMiBAHidNO03p4EKISBoEw=' 
WHERE 
  key_id = '5b4fedf60a05c402d724d1dc51d8f5f98eba65da37a58e8f1d060c117c603edc' 
  AND (
    token = 'WAkfnkaS/Pljc0iyNKPvFvMiBAHidNO03p4EKISBoEw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032