UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'PZtrbXmzGRv7RzW/t7ylFTgNhUf2YVzEI/tV1OO4hp0=' 
WHERE 
  key_id = '33ff797d67cd2326c5a17a750b153c8ef673eafea68b279aabc1289f5c0d12c4' 
  AND (
    token = 'PZtrbXmzGRv7RzW/t7ylFTgNhUf2YVzEI/tV1OO4hp0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033