UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FGTaQwReDR8e1963dcmN+2/yTDK0x63cp3ner4idPJg=' 
WHERE 
  key_id = 'a2c8ae5f0de219b7f86a93e97c09478789c55bc41b98d49a8a7de8152b00941a' 
  AND (
    token = 'FGTaQwReDR8e1963dcmN+2/yTDK0x63cp3ner4idPJg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029