UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/vMOOpSa9MlTlvFYews/ncSQdcgzakfA8sDtDPZunDo=' 
WHERE 
  key_id = 'cc0ad0621f812223b00715680e6569c29b72ace5aa12a46f5c6a2ab8a8abed8b' 
  AND (
    token = '/vMOOpSa9MlTlvFYews/ncSQdcgzakfA8sDtDPZunDo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024