UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '80LePc1S/X+zB21hlcM5RAB7PmpX3lBExJNdUbf4Of0=' 
WHERE 
  key_id = '44ddc7f30bc6e8fa477f438d3a057d008f14cac93bda7253b642c7ba5abf8be7' 
  AND (
    token = '80LePc1S/X+zB21hlcM5RAB7PmpX3lBExJNdUbf4Of0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034