UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/1dMJm9N3+bp8p3SuLe+SEbi7BRbjmr30T0zoDdM79M=' 
WHERE 
  key_id = '228f95f90b2c0cac68b9194179e0cff7d78d6a02fe30fb32675c95ff7d6253b2' 
  AND (
    token = '/1dMJm9N3+bp8p3SuLe+SEbi7BRbjmr30T0zoDdM79M=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020