UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+67ckUZC5MxMnStchN9Gi+61pN5mb/kQM+qBibaWpT4=' 
WHERE 
  key_id = 'b6e253af10f429a213af29b8e1eab7442173167d91ad18348ad5009f5ecf2c05' 
  AND (
    token = '+67ckUZC5MxMnStchN9Gi+61pN5mb/kQM+qBibaWpT4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027