UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7WZLB9LMUS9PdOvHhhjhQcyS0ED/W+PeZDhxM2pUDFk=' 
WHERE 
  key_id = '8e90976ad39d549bf8c51c3cbdbe5baf55aa33c19d632a9016b208e4c02ad9ba' 
  AND (
    token = '7WZLB9LMUS9PdOvHhhjhQcyS0ED/W+PeZDhxM2pUDFk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019